package com.fs.vo;

import com.fs.pojo.WhInvInventory;
import lombok.Data;

import java.util.List;

/**
 * @author yyds
 * @fileName condition
 * @date 2024/9/10 22:02
 * @description
 **/
@Data
public class Condition<T> {
    private Integer page;
    private Integer count;
    private Integer maxPage;
    private Integer total;
    private Integer index;

    private List<T> data;
    private  T search;


    public Integer getMaxPage() {
        this.maxPage = (this.total + this.count - 1) / this.count;
        return maxPage;
    }

    public Integer getIndex() {
        this.index = (this.page - 1) * this.count;
        return index;
    }
}
